<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="org.springframework.security.web.*,org.springframework.security.core.userdetails.*,org.springframework.security.*,org.springframework.security.authentication.*" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
  String rootpath = request.getContextPath();
  Object e = request.getSession(false).getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
  String message = "";
  if (BadCredentialsException.class.isInstance(e)) {
	  message = "Wrong username or password!"; 
  }
  request.getSession().invalidate();
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JStar</title>

<script language="javascript" type="text/javascript">
function clearText(field){
if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;
}
window.addEvent('load', function(){
new ByZoomer();	
});
</script>
</head>
<body>
<div id="top_bg" style="height:830px;">
    <div id="header">
      <div id="logo">  Jstar System  </div>
    </div>
<center>
  <div class="container">
    <div id="content">
        <div class="section">
          <div class="section_1_top"> MEMBER LOGIN </div>
          <div class="section_1_mid">
            <div class="form">
              <form method="post" action="dologin">
                <div class="label">
                  <label>Username :</label>
                  <label>Password :</label>
                </div>
                <div class="textboxes">
                  <input id="username" name="j_username" type="text" onfocus="clearText(this)" onblur="clearText(this)" class="textfield"/>
                  <input id="password" name="j_password" type="password" onfocus="clearText(this)" onblur="clearText(this)" class="textfield"/>
                </div>
                 <div>
                  <span class="errorMessage"><font color="Red"><%=message%></font></span>
                </div>
                <div class="cleaner_with_height"></div>
                <div class="login_bottom">
                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  <input type="submit" name="login" value="" class="button"/>
                </div>
              </form>
            </div>
            <div class="cleaner_with_height"></div>
          </div>
          <div class="section_1_bottom"></div>
        </div>
    </div> 
  </div>
</div>
</center>
</body>
</html>
